Update init group for adaptive muon - #132
Merged
Merged
Conversation
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Contributor
Greptile SummaryThis PR refactors Key changes:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["_init_group(group, skip_non_grad_params)"] --> B["For each param p"]
B --> C{"skip_non_grad_params\nAND p.grad is None?"}
C -->|Yes - skip| B
C -->|No| D{"len(state) == 0?"}
D -->|No - already init| B
D -->|Yes| E["state momentum_buffer = zeros_like(p.data)"]
E --> F{"moment2_method?"}
F -->|adamuon| G["NO ndim check - allocates for any shape"]
G --> H["state moment2_buffer = zeros_like(p.data)"]
H --> B
F -->|normuon| I{"p.data.ndim != 2?"}
I -->|Yes| J["raise ValueError - clear early error"]
I -->|No| K["compute moment2_shape reduced buffer"]
K --> B
F -->|other| L["raise TypeError"]
Last reviewed commit: "fix AI format error" |
Contributor
Author
|
/ok to test 33782da |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Hao Wu <skyw@users.noreply.github.com>
Contributor
Author
|
/ok to test 69627ba |
Signed-off-by: Hao Wu <skyw@nvidia.com>
Signed-off-by: Hao Wu <skyw@nvidia.com>
Contributor
Author
|
/ok to test e06ba85 |
FDecaYed
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For megatron distributed checkpoint use.